<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>

		<li><?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $this->Form->value('Admin.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Admin.id'))); ?></li>
		<li><?php echo $this->Html->link(__('List Admins', true), array('action' => 'index'));?></li>
		<li><?php echo $this->Html->link(__('List Groups', true), array('controller' => 'groups', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Group', true), array('controller' => 'groups', 'action' => 'add')); ?> </li>

	</ul>
</div>
<div class="admins form">

<?php echo $this->Form->create('Admin');?>
	<fieldset>
 		<legend><?php __('Edit Admin'); ?></legend>
	<?php
		echo $this->Form->input('id');
		echo $this->Form->input('group_id');
		echo $this->Form->input('user');
                echo $this->Form->input('mot-passe',array('type'=>'hidden'));
                echo $this->Form->input('mot-passe3',array('type'=>'hidden','value'=>$this->data['Admin']['mot-passe']));
                echo $this->Form->input('mot-passe1',array('label'=>'Inser votre mot-passe','type'=>'password'));
		echo $this->Form->input('mot-passe2',array('label'=>'Inser votre nouvelle mot-passe','type'=>'password'));
		echo $this->Form->input('nom');
		echo $this->Form->input('prenom');
//                debug($this->data);
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<script>
                    // Select all of the forms on the page (in this case the only one)
                    // and call 'validity' on the result.

                    $(function() {
                        $("#AdminEditForm").validity(function() {
                            $("#AdminUser")                      // The first input:
                            .require("User est obligatoire.");


                     $("#AdminMot-passe1")                      // The first input:
                            .require("Mot-passe est obligatoire.");

                            $("#AdminMot-passe2")                      // The first input:
                            .require("Mot-passe est obligatoire.");

                            $("#AdminNom")                      // The first input:
                            .require("Nom est obligatoire.");

                            $("#AdminPrenom")                      // The first input:
                            .require("Prenom est obligatoire.");

                        });

                        });
                </script>